package com.rabbitmq.Mapper;

import com.rabbitmq.Entity.TConfiguration;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface JpaMapper extends JpaRepository<TConfiguration,String>{

    @Query(value = "select a.value from t_configuration a where a.key= :key", nativeQuery = true)
    String findValueByKey(@Param("key") String key);

}
